﻿<div>
    <div class="page-header">
        <h2 class="text-center">服务器系统监视</h2>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <h2 class="text-center">
                        服务器系统信息概览
                    </h2>
                </div>

                <div class="card-body m-t-0">
                    <table class="table table-inner table-vmiddle table-bordered">
                        <tbody>
                            <tr>
                                <td>网站开机时长</td>
                                <th>{{RunningTime}}</th>
                                <td>服务器开机时长</td>
                                <th>{{BootTime}}</th>
                                <td>操作系统</td>
                                <th>{{osVersion}}</th>
                            </tr>
                            <tr>
                                <td>CPU型号</td>
                                <th>{{cpu.Type}}</th>
                                <td>CPU基础频率</td>
                                <th>{{cpu.CurrentClockSpeed}} MHz</th>
                                <td>CPU睿频</td>
                                <th>{{cpu.MaxClockSpeed}} MHz</th>
                            </tr>
                            <tr>
                                <td>CPU个数</td>
                                <th>{{cores}}插槽</th>
                                <td>CPU核心数</td>
                                <th>{{cpu.NumberOfCores}} 核心</th>
                                <td>CPU线程数</td>
                                <th>{{cpu.NumberOfLogicalProcessors}} 线程</th>
                            </tr>
                            <tr>
                                <td>CPU当前频率</td>
                                <th>{{cpu.CpuLoad*cpu.MaxClockSpeed/100|number:2}} MHz</th>
                                <td>CPU使用率</td>
                                <th>{{cpu.CpuLoad|number:2}} %</th>
                                <td>物理总内存</td>
                                <th>{{memory.PhysicalMemory/1048576|number:2}} MB</th>
                            </tr>
                            <tr>
                                <td>物理内存已使用</td>
                                <th>{{(memory.PhysicalMemory*memory.MemoryUsage/104857600)|number:2}} MB</th>
                                <td>物理内存剩余</td>
                                <th>{{(memory.PhysicalMemory*(100-memory.MemoryUsage)/104857600)|number:2}} MB</th>
                                <td>内存使用率</td>
                                <th>{{memory.MemoryUsage|number:2}} %</th>
                            </tr>
                            <tr>
                                <td>虚拟内存总数</td>
                                <th>{{memory.TotalPageFile/1048576|number:2}} MB</th>
                                <td>虚拟内存已使用</td>
                                <th>{{(memory.TotalPageFile-memory.AvailablePageFile)/1048576|number:2}} MB</th>
                                <td>虚拟内存可用</td>
                                <th>{{memory.AvailablePageFile/1048576|number:2}} MB</th>
                            </tr>
                            <tr>
                                <td colspan="1">磁盘总空间</td>
                                <th colspan="5">{{disk.total}}</th>
                            </tr>
                            <tr>
                                <td colspan="1">磁盘剩余空间</td>
                                <th colspan="5">{{disk.free}}</th>
                            </tr>
                            <tr>
                                <td colspan="1">磁盘使用率</td>
                                <th colspan="5">{{disk.usage}}</th>
                            </tr>
                            <tr ng-repeat="item in netInfo.mac">
                                <td>MAC地址-{{$index}}</td>
                                <th colspan="2">{{item}}</th>
                                <td>IP地址-{{$index}}</td>
                                <th colspan="2">{{netInfo.ips[$index]}}</th>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="btn-group pull-right">
                    <button class="btn btn-info waves-effect" ng-click="ClearPerfCounter()">清空性能计数器</button>
                    <button class="btn btn-success waves-effect" ng-click="StopPush()">{{push}}推送</button>
                </div>
            </div>
        </div>
    </div>
    <div>
        <div class="page-header">
            <h3 class="text-center">性能实时监控</h3>
        </div>
        <div class="row">
            <div id="container-speed" class="col-md-4" style="height: 200px;"></div>
            <div id="container-rpm" class="col-md-4" style="height: 200px;"></div>
            <div id="container-io" class="col-md-4" style="height: 200px;"></div>
        </div>
    </div>
    <div>
        <div class="page-header">
            <h3 class="text-center">
                硬件资源监控
            </h3>
        </div>
        <div class="row">
            <div id="cpu" class="col-md-6" style="height: 500px;"></div>
            <div id="io" class="col-md-6" style="height: 500px;"></div>
        </div>
    </div>
</div>